from enum import Enum


class RequestHeaders(Enum):
    REFERER = 'https://t.bilibili.com/?spm_id_from=333.788.0.0'
    USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' \
                 'Chrome/99.0.4844.74 Safari/537.36'
    COOKIE = ""


class DownloadType(Enum):
    VIDEO = 1
    AUDIO = 2


class ErrorInfo(Enum):
    URL_IS_NONE = 'url为空'
    URL_IS_WRONG = 'url错误'
    DOWN_LOAD_TYPE_IS_WRONG = '下载类型错误'
    COOKIE_IS_NONE = 'cookie为空，可下载视频，但清晰度较低，建议在common/constant.py中为cookie赋值'


class XPath(Enum):
    TITLE = '/html/head/title/text()'
    SCRIPT_TEXT = '/html/head/script[4]/text()'


class CommonStrings(Enum):
    PLAY_INFO = 'window.__playinfo__='
    DOWNLOADING = '下载中...'
    REDUNDANT_STR = '_哔哩哔哩_bilibili'
